home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 305 < prev    next >
Internet Message Format  |  1996-08-06  |  1KB

  1. Path: teal.csn.net!not-for-mail
  2. From: thads@csn.net (Thad Smith)
  3. Newsgroups: comp.lang.c,comp.lang.c++,gnu.gcc.help,gnu.g++.help,comp.os.msdos.djgpp,comp.std.c
  4. Subject: Re: float != float and floats as return types
  5. Date: 4 Feb 1996 22:09:25 -0700
  6. Organization: T3 Systems
  7. Message-ID: <icPFxQ9yth8T084yn@csn.net>
  8. References: <4ej9lb$mpc@fu-berlin.de> <4elnjj$er4@server2.rz.uni-leipzig.de>
  9.  <4eqc7l$ugh@godzilla.zeta.org.au> <4eqtu3$ddo@der.twinsun.com>
  10.  <TANMOY.96Feb1164022@qcd.lanl.gov> <4ettr4$al5@der.twinsun.com>
  11.  <TANMOY.96Feb3105644@qcd.lanl.gov>
  12. Reply-To: ThadSmith@acm.org
  13. NNTP-Posting-Host: 199.117.27.22
  14.  
  15. In article <TANMOY.96Feb3105644@qcd.lanl.gov>,
  16. tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya) wrote:
  17.  
  18. >As you explicitly state, this is a conversion from float to float, so
  19. >no conversion ought to take place according to the section
  20. >quoted. This, I believe, needs to be corrected: I guess the
  21. >possibility of extra precision was not thought of in this section. 
  22.  
  23. I recall that Plauger admitted this in one of his CUJ columns several
  24. years ago.
  25.  
  26. As a work-around, one can cast an expression twice to trigger the
  27. conversion:
  28.  
  29.     (float)(long double) (f1 + f2)
  30.  
  31. Thad
  32.